﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddCompany.aspx.cs" ValidateRequest="false"
    Inherits="NJL.WebManage.Company.AddCompany" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <script type="text/javascript">
        function check() {
            var regInt = /^\d+/; //整数
            var txtSort = document.getElementById("<%=txtSort.ClientID %>").value;
            if (regInt.exec(txtSort) == null) {
                alert("排序只能输入整数");
                return false;
            }
            var txtTrait = document.getElementById("<%= txtTrait.ClientID%>").value;
            var txtName = document.getElementById("<%=txtName.ClientID %>").value;
            if (txtName == "") {
                alert("请输入名称");
                return false;
            }
            //地区选择
            var selectArea = document.getElementById("<%=ddlCity.ClientID %>");
            if (selectArea != null) {
                if (selectArea.value == "000000") {
                    alert("请选择地区");
                    return false;
                }
            }
            if (txtName.length > 25) {
                alert(" 您输入的名称字数超过25个请重新输入");
                return false;
            }
            if (txtTrait.length > 100) {
                alert("您输入的特色招牌字数超过100个请重新输入");
                return false;
            }
            var txtIntro = document.getElementById("<%=txtCompanyIntro.ClientID %>").value;
            if (txtIntro.length > 100) {
                alert("简介长度不要超过100个汉字");
                return false;
            }
            //页面描述
            var txtDescription = document.getElementById("<%=txtDescription.ClientID %>").value;
            if (txtDescription.length > 100) {
                alert("页面描述内容数超过100个字符请重新输入");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="gray_bd">
        <div class="table_title">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            添加-<asp:Literal ID="litTitle" runat="server"></asp:Literal>
        </div>
        <div class="pad5px">
            <table align="center" cellspacing="0" style="width: 100%">
                <tr>
                    <td style="width: 120px; text-align: right;">
                        排序：
                    </td>
                    <td>
                        <asp:TextBox ID="txtSort" runat="server" MaxLength="8" Width="50px">0</asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        名称：
                    </td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server" Width="50%" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        企业简称：
                    </td>
                    <td>
                        <asp:TextBox ID="txtCompanyNameSms" runat="server" Width="50%" MaxLength="6"></asp:TextBox>最多6个字
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地区：
                    </td>
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:DropDownList ID="ddlProvince" runat="server" OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged"
                                    AutoPostBack="True">
                                </asp:DropDownList>
                                &nbsp;
                                <asp:DropDownList ID="ddlCity" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="ddlCity_SelectedIndexChanged">
                                </asp:DropDownList>
                                &nbsp;
                                <asp:DropDownList ID="ddlArea" runat="server">
                                </asp:DropDownList>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        图片：&nbsp;
                    </td>
                    <td>
                        <asp:FileUpload ID="FileUpload1" runat="server" />
                        请上传600*450尺寸以内的图片
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        邮政编码：
                    </td>
                    <td>
                        <asp:TextBox ID="txtPostCode" runat="server" Width="50%" MaxLength="10"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地址：
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddress" runat="server" Width="50%" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地图地址：
                    </td>
                    <td>
                        <asp:TextBox ID="txtMapAddress" runat="server" Width="50%" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right;" class="style1">
                        联系人：
                    </td>
                    <td class="style2">
                        <asp:TextBox ID="txtLinkman" runat="server" Width="50%" MaxLength="25"></asp:TextBox>
                    </td>
                    <td class="style2">
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        电话：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtTel" runat="server" Width="50%" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        传真：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtFax" runat="server" Width="50%" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        手机：
                    </td>
                    <td>
                        <asp:TextBox ID="txtPhone" runat="server" Width="50%" MaxLength="11"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        QQ：
                    </td>
                    <td>
                        <asp:TextBox ID="txtQQ" runat="server" Width="50%" MaxLength="10"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        MSN：
                    </td>
                    <td>
                        <asp:TextBox ID="txtMsn" runat="server" Width="50%" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        显示联系方式：
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblContact" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        开通预订：
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblyd" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        接收手机短信：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtSMS" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        简介：
                    </td>
                    <td>
                        <asp:TextBox ID="txtCompanyIntro" runat="server" Width="50%" TextMode="MultiLine"
                            Height="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        交通指南：
                    </td>
                    <td>
                        <asp:TextBox ID="txtJTZN" runat="server" Width="50%" TextMode="MultiLine" Height="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        特色招牌：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTrait" runat="server" Width="50%" TextMode="MultiLine" Height="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        企业介绍：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtServiceProject" runat="server" TextMode="MultiLine" Height="61px"
                            Width="100%"></asp:TextBox>
                        <script type="text/javascript">
                            CKEDITOR.replace('<%=txtServiceProject.ClientID%>',
                            {
                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
                            }
                            );
                        </script>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        订票须知：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtTICKET_NOTICE" runat="server" TextMode="MultiLine" Height="61px"
                            Width="100%"></asp:TextBox>
                        <script type="text/javascript">
                            CKEDITOR.replace('<%=txtTICKET_NOTICE.ClientID%>',
                            {
                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
                            }
                            );
                        </script>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面标题：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" Width="100%" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面关键字：
                    </td>
                    <td>
                        <asp:TextBox ID="txtKeyWords" runat="server" Width="100%" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面描述：
                    </td>
                    <td>
                        <asp:TextBox ID="txtDescription" runat="server" Height="51px" TextMode="MultiLine"
                            Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Style="height: 21px"
                            Text="提交" Width="40px" OnClientClick="return check()" />
                        &nbsp;<input id="Reset1" type="reset" value="重置" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
